// home/03list/order.js
var co = require('../../js/common.js')
var that, app = getApp()
Page({
   data: {
      orderList: []
   },

   onLoad: function (opt) {
      that = this
      var param = { creator_uid: app.aData.userInfo.unionid }
      co.getSelfApi('order/Mg/getOrderList', param, function (res) {
         that.setData({ orderList: res.data })
         console.log('【输出that.data】', that.data)
      })
   },

   toDetail: function (e) {
      var order = this.data.orderList[e.currentTarget.id]
      wx.navigateTo({
         url: '/home/04order/detail?order_id=' + order.order_id
      })
   },

   onHide: function () {
      console.log('【mypostedorder隐藏了】')
   },

   onUnload: function () {
      console.log('【mypostedorder卸载了】')
   },
})

